package model;

import java.io.Serializable;
import javax.sound.sampled.AudioFormat;

/**
 * La classe soundSetting gère les paramétres audio <br>
 * @author Romain Bustos
 * @author Matthieu Perrin
 * @version 1.0
 */
public class soundSetting implements Serializable
{
    
    private int sampleRate;
    private int sampleSizeInBits;
    private int seuil;
    private int channels;
    private boolean signed;
    private boolean bigEndian;

    public soundSetting() {
        this.sampleRate = 16000;
        this.sampleSizeInBits = 16;
        this.seuil = 30;
        this.channels = 1;
        this.signed = true;
        this.bigEndian = true;
    }
    
    
    public Integer getSampleRate() {
        return sampleRate;
    }

    public Integer getSampleSizeInBits() {
        return sampleSizeInBits;
    }

    public void setSampleRate(int sampleRate) {
        this.sampleRate = sampleRate;
    }

    public void setSampleSizeInBits(int sampleSizeInBits) {
        this.sampleSizeInBits = sampleSizeInBits;
    }

    public Integer getSeuil() {
        return seuil;
    }

    public void setSeuil(int seuil) {
        this.seuil = seuil;
    }
    
    public AudioFormat getFormat() {
        return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);
    }
}
